package com.boot4g.admin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * ${DESCRIPTION}
 *
 */
//@EnableDiscoveryClient  //激活eureka中的DiscoveryClient实现
@EnableHystrix
@EnableEurekaClient
@SpringBootApplication
@EnableTransactionManagement
@ComponentScan(basePackages={"com.boot4g"})
public class AdminPortalBootstrap extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(AdminPortalBootstrap.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(AdminPortalBootstrap.class);
    }
}
